<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="format-detection" content="telephone=no" />
		 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>查询</title>
		<link rel="stylesheet" href="https://unpkg.com/mint-ui/lib/style.css">
		<link rel="stylesheet" type="text/css" href="css/qurey.css"/>
	</head>
	<body>
		<div id="qurey">
			<p class="seach">
				<input type="number" placeholder="搜索" v-model="number"/><span class="seach_btn" v-if="unbind" v-on:click="Http()"><img src="img/qurey/sousuo.png"/></span>
			</p>
			<div class="show">
				<img class="img_show"  v-bind:src="imgsrc"/>
				<p class="img_p">{{Ctext}}</p>
			</div>
		</div>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="https://unpkg.com/mint-ui/lib/index.js"></script>
		<script src="js/vue-resource.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/common/common.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			new Vue({
				el:"#qurey",
				data:{
					number:'',
					imgsrc:'http://www.joyue-tech.com/szptApp/userfiles/1/_thumbs/images/111.jpg',
					Ctext:'',
					unbind:'true'
				},
				created:function(){
					
				},
				methods:{
					Http:function(){
						var _self = this;
						var number = _self.number;
						console.log(number);
						_self.unbind = false;
						_self.Ctext = "加载中";
						var url = "http://www.joyue-tech.com/szptApp/a/zhtj/stupicture/getPictureByNum?xh=" + number;
						_self.$http.post(url).then(function(res){
							console.log(res);
							if(res.status == 200){
								if(res.body.data == undefined){
									_self.Ctext = res.body.msg;
								}else{
									_self.Ctext = "加载完成";
									console.log(res.body.data);
									_self.imgsrc ="http://" +  res.body.data;
									console.log(_self.imgsrc)
								}
								_self.unbind = true;
								setTimeout(function(){
									_self.Ctext = '';
								},500)
//								_self.imgsrc = "www.joyue-tech.comuserfiles\1\_thumbs\images\123";
							}
						})
					}
				}
			})
		</script>
	</body>
</html>
